package Model;
import java.util.Calendar;
import java.util.GregorianCalendar;
import DBAccess.DBAccess;
import Model.Wall.Post;

public class Version {

    public static void main(String[] args) {

//        Connection con = null;
//        Statement st = null;
//        ResultSet rs = null;
//
//        String url = "jdbc:mysql://localhost:3306/cs410";
//        String user = "root";
//        String password = "root";
//
//        try {
//            con = DriverManager.getConnection(url, user, password);
//            st = con.createStatement();
//            rs = st.executeQuery("SELECT VERSION()");
//
//            if (rs.next()) {
//                System.out.println(rs.getString(1));
//            }
//
//        } catch (SQLException ex) {
//            Logger lgr = Logger.getLogger(Version.class.getName());
//            lgr.log(Level.SEVERE, ex.getMessage(), ex);
//
//        } finally {
//            try {
//                if (rs != null) {
//                    rs.close();
//                }
//                if (st != null) {
//                    st.close();
//                }
//                if (con != null) {
//                    con.close();
//                }
//
//            } catch (SQLException ex) {
//                Logger lgr = Logger.getLogger(Version.class.getName());
//                lgr.log(Level.WARNING, ex.getMessage(), ex);
//            }
//        }
    	
    	System.out.println("hello");
    	new DBAccess();
    	Calendar calendar = new GregorianCalendar();
    	int MILSEC_IN_SECS=1000;
    	int time = (int) (calendar.getTimeInMillis()/MILSEC_IN_SECS);
    	System.out.println(calendar.getTimeInMillis()/MILSEC_IN_SECS);
    	Post apost = new Post(144, 1, time, "3:57");
    	
    	System.out.println("FromID:" + apost.getFromID());
   
    	System.out.println("GetMessage:" + apost.getMessage());
    	
    	System.out.println("PostTime:" + apost.getPostTime());
    	
    	System.out.println("UserID:" + apost.getUserID());

    	System.out.println("PostID:" + apost.getPostID());
    	
    }
}